﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using OMEGA.ControlLibrary;

namespace WinForm
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();

            InitControl();
        }

        /// <summary>
        /// 启动系统基本步骤：
        /// 1.获取服务
        /// 2.通过服务获取想要呈现照片的文件夹
        /// 3.将照片转换成List<ImageParams>
        /// 4.将照片list放入照片ListView
        /// </summary>
        private void InitControl()
        {
            IList<ImageParams> list = new List<ImageParams>();
            for (int i = 0; i < 10; i++)
            {
                string ImagePath = string.Format(@"N:\photoTest\{0}.jpg", i);
                string fileName = string.Format("{0}.jpg",i);
                list.Add(new ImageParams(ImagePath, i,fileName));
            }
            //ImageListView imageListView = new ImageListView();
            //imageListView.InitParams(list);
            //imageListView.Dock = DockStyle.Top;
            //this.Controls.Add(imageListView);

            ImageListView imageListView1 = new ImageListView();
            imageListView1.InitParams(list);
            imageListView1.Dock = DockStyle.Fill;
            this.Controls.Add(imageListView1);
        }
    }
}
